export interface LoginRequestData {
  /** 账户名 */
  accountName: string
  /** 密码 */
  password: string
  /** 验证码 */
  captcha?: string
  /** 验证码ID */
  captchaKey?: string
  /** 记住我 */
  rememberMe?: boolean
}

export interface UserInfo {
  id: number
  username: string
  email: string
  phone?: string
  avatar?: string
  status: number
  lastLoginAt?: string
  createdAt: string
  updatedAt: string
}

export interface CaptchaData {
  captchaId: string
  captchaImage: string
  expireTime: number
  expireIn: number
}

export type CaptchaResponseData = ApiResponseData<CaptchaData>

export type LoginResponseData = ApiResponseData<{
  accessToken: string
  refreshToken: string
  expiresIn: number
}>

export type UserInfoResponseData = ApiResponseData<UserInfo>
